fs/jfs: Inconsistent signed/unsigned types usage in return values
authorLidong Chen <lidong.chen@oracle.com>
Mon, 16 Dec 2024 20:22:40 +0000 (20:22 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commitb7d14f1fbe4bf01d5553aad798e0585b133b540b
tree845136752a3827534a76ee8ea0773e3b05a06e92
parent24248167fa9878dfd4ae7ad25d5ba0e8ea374b06
fs/jfs: Inconsistent signed/unsigned types usage in return values

The getblk() returns a value of type grub_int64_t which is assigned to
iagblk and inoblk, both of type grub_uint64_t, in grub_jfs_read_inode()
via grub_jfs_blkno(). This patch fixes the type mismatch in the
functions. Additionally, the getblk() will return 0 instead of -1 on
failure cases. This change is safe because grub_errno is always set in
getblk() to indicate errors and it is later checked in the callers.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-jfs-Inconsistent-signed-unsigned-types-usage-in-return.patch
grub-core/fs/jfs.c